export default {
  install: function (Vue) {
    Vue.directive('title', {
      inserted: function (el, binding) {
        document.title = binding.value
        var ua = navigator.userAgent.toLowerCase()
        if (/iphone/.test(ua) || /ios/.test(ua) || /ipad/.test(ua) || /^apple$/.test(ua)) {
          /* eslint-disable no-undef */
          navTitleHandler(binding.value)
        }
      }
    })
  }
}
